<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<?php
session_start();
if (!isset($_SESSION['email'])){echo "<script language=\"javascript\">location.href=\"prob_quiz.php\";</script>";}
$email=$_SESSION['email'];
$query2="select score from login where email=\"$email\";";
$result2=mysql_query($query2);
if (!mysql_query($query2)){die('Error: ' . mysql_error());} 
$row2=mysql_fetch_array($result2);
$score=$row2[0];
$score-=1;
$qno=$_SESSION['aq'];
$qn='q'.$qno;
echo  "<script language=\"javascript\"> alert(\"question Skipped \\nyour new score is $score\")</script>";
$updateq="update usertrack set $qn=1 where email=\"$email\"";
$updateu="update login set aq=-1,score=$score where email=\"$email\"";
$_SESSION['aq']=-1;
if (!mysql_query($updateq)){die('Error: ' . mysql_error()); }
if (!mysql_query($updateu)){die('Error: ' . mysql_error()); }
echo "<script language=\"javascript\">location.href=\"prob_quiz.php\";</script>";
die();
?> 

</body>
</html>
